<!DOCTYPE html> 

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 
<h:head>

	<style>
				label {		
				width: 100px;
				text-align: right;
				display:inline-block;
				*display:inline; /* hack para ie7 */
				}
	</style>
</h:head> 
<h:body>
	<f:view>
		<h:form enctype="multipart/form-data">  
  
		    <p:messages showDetail="true" id="msg"/>  
	  
	     	<p:fileUpload auto="false" update="msg" mode="simple" value="#{fileUploadController.file}" allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/>  
	    	  <p:commandButton value="Submit" ajax="false"  
	                action="#{fileUploadController.upload2}" />  
  
		</h:form>  
			</f:view>
</h:body> 
</html>
